package com.demo.controller;

import com.demo.bean.UserDTO;
import com.demo.provider.UserProvider;
import com.demo.service.UserService;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * UserController
 *
 * @author liujin
 * @date 2020/11/4 17:22
 */
@RestController
public class UserController implements UserProvider {

    @Resource
    private UserService userService;


    @Override
    public String user(@Valid UserDTO dto) {
        userService.user(dto);
        return "user";
    }
}
